
/** 弹窗显示 */

import React from "react";

export function useVisible(v = false) {

    const [open, setOpen] = React.useState(v);

    const onClose = React.useCallback(() => { setOpen(false) }, [])

    const onOpen = React.useCallback(() => { setOpen(true) }, [])

    return { open, onClose, onOpen }
}